<?php
require_once ("src/db/connectdatabase.php");

function getCards() {
	$con = new ConnectDB();
	
	$tbl = "card";
	$fn = array('idcard', 'cardname', 'imagecard', 'intro');
	$condetion = array('isuse' => true);
	$flike = array();
	return $con -> getvalueall($tbl, $fn, $condetion, $flike, 'datecreate');
}

function getIntro($id) {
	$con = new ConnectDB();
	$tbl = " loan_intro_footer";
	$fn = array('header', 'footer');
	$condetion = array('id' => $id);
	return $con -> getvalue($tbl, $fn, $condetion);
}
$id = "card_co_san";
$intro = getIntro($id);

$arrcards = getCards();
?>
<style type="text/css">
.ullicard {
	list-style-type: none;
	padding-left: 10px;
	padding-right: 0;
	padding-top: 0;
	padding-bottom: 4px;
	list-style: none outside none;
	margin-bottom: 10px;
	float: left;
}

</style>
<div style="float:left; text-align: left;">
    <div class="text12" style="width: 970px; height: 11px; margin-top: 11px; color: #0a8bd9;"><u><a href="http://taichinhonline.vn" class="text12" style="color: #0080d6;">Trang Chủ</a></u>&gt; <u><a href="<?php echo($host) ?>the-tin-dung-ghi-no.html" class="text12" style="color: #0080d6;">Thẻ tín dụng ghi nợ</a></u>&gt; Sản phẩm thẻ thông dụng</span></div>
    <div class="intrl_txt">
        <div style="clear: both; height: 15px;"></div><iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Ffacebook.com%2Ftaichinhonline.vn&amp;width=450&amp;height=80&amp;colorscheme=light&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;send=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:660px; height:25px;" allowTransparency="true"></iframe>
        <div style="clear:both;"></div>
        <div><? if(count($intro) > 0) echo($intro[0][0]); ?></div>
        <div style="clear:both;"></div>
        <div style="width: 970px;" class="divviewcardcosan">
        	<ul style="margin-left: -35px;">
            	<?php 
                foreach($arrcards as $entry) {
                ?>
            	<li class="ullicard">
                	<table class="crdbg" border="0" cellpadding="0" cellspacing="0" style="font-size: 12px;">
                        <tr>
                            <td height="30" class="crdbhdng" style="color: #FFF;"><?php echo($entry[1]) ?></td>
                        </tr>
                        <tr>
                            <td height="135" align="center"><img src="<?php echo($host) ?><?php echo($entry[2]) ?>" width="150" height="94"></td>
                        </tr>
                        <tr>
                            <td><div style="padding: 8px; overflow-y: auto; height: 440px; margin-bottom:11px; margin-right:3px;"><?php echo($entry[3]) ?></div></td>
                        </tr>
                        <tr>
                            <td align="center" valign="bottom"><a href=""><img src="<?php echo($host) ?>images/get1.gif" border="0" onclick="javascript:window.open(&#39;)"></a>
                            </td>
                        </tr>
                	</table>
                </li>
                 <?php
                }
                ?>
            </ul>
        </div>
        <!--<table width="970px" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td valign="top" class="crdbg" width="240px">
                        
                    </td>
                </tr>
               
            </tbody>
        </table>-->
        <div style="clear:both;"></div>
         <div><? if(count($intro) > 0) echo($intro[0][1]); ?></div>
        <div style="clear:both;"></div>
    </div>
</div>
<div style="clear:both;"></div>